package com.kingyun.gpsinspection.purificationservice.services.jsm.innerservice.impl.orgarea;

import com.kingyun.gpsinspection.purificationservice.dao.mapper.jsm.OrgUserMapper;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.OrgUser;
import com.kingyun.gpsinspection.purificationservice.facade.service.jsm.orgarea.JsmOrgUserService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Author 卢曼成
 * @Description 组织用户逻辑层
 * @Date 2017/2/20 17:18
 */

public class JsmOrgUserServiceImpl implements JsmOrgUserService {
    @Autowired
    private OrgUserMapper orgUserMapper;

    /**
     * 根据ID删除
     *
     * @param orgUserId
     * @return
     */
    @Override
    public int deleteByPrimaryKey(String orgUserId) {
        return orgUserMapper.deleteByPrimaryKey(orgUserId);
    }

    /**
     * 添加
     *
     * @param record
     * @return
     */
    @Override
    public int insert(OrgUser record) {
        return orgUserMapper.insert(record);
    }

    /**
     * 非空添加
     *
     * @param record
     * @return
     */
    @Override
    public int insertSelective(OrgUser record) {
        return orgUserMapper.insertSelective(record);
    }

    /**
     * 根据ID查询
     *
     * @param orgUserId
     * @return
     */
    @Override
    public OrgUser selectByPrimaryKey(String orgUserId) {
        return orgUserMapper.selectByPrimaryKey(orgUserId);
    }

    /**
     * 非空修改
     *
     * @param record
     * @return
     */
    @Override
    public int updateByPrimaryKeySelective(OrgUser record) {
        return orgUserMapper.updateByPrimaryKeySelective(record);
    }

    /**
     * 修改
     *
     * @param record
     * @return
     */
    @Override
    public int updateByPrimaryKey(OrgUser record) {
        return orgUserMapper.updateByPrimaryKeySelective(record);
    }

    /**
     * @param list
     * @Author 卢曼成
     * @Description 批量添加
     * @Date 2017/2/8 17:17
     */
    @Override
    public int insertList(List<OrgUser> list) {
        return orgUserMapper.insertList(list);
    }

    /**
     * @param list
     * @Author 卢曼成
     * @Description 批量修改
     * @Date 2017/2/8 17:17
     */
    @Override
    public int updateList(List<OrgUser> list) {
        return orgUserMapper.updateList(list);
    }

    /**
     * @param list
     * @Author 卢曼成
     * @Description 批量逻辑删除
     * @Date 2017/2/8 17:17
     */
    @Override
    public int deleteList(List<OrgUser> list) {
        return orgUserMapper.deleteList(list);
    }

    /**
     * @param list
     * @Author 卢曼成
     * @Description 根据条件查询Id集合
     * @Date 2017/2/8 17:17
     */
    @Override
    public List<String> selectByListId(List<OrgUser> list) {
        return orgUserMapper.selectByListId(list);
    }
}
